<!DOCTYPE html>
<html>

<head>
    <title>{$site_info.seoTitle|default='eduYouke在线教育点播系统'} 收银台</title>
    <meta name="keywords" content="{$site_info.seoKeywords|default='eduYouke在线教育点播系统'}" />
    <meta name="description" content="{$site_info.seoDescription|default='eduYouke在线教育点播系统'}">
    {include file='../public/header' /}
    <link href="__TEMPSTATIC__/css/course.css" rel="stylesheet">
</head>

<body class="hold-transition layout-top-nav">
    <div class="wrapper">
        {include file='../public/nav' /}
        <div class="content-wrapper">
            <div class="content">
                <div class="container">
                    <br>
                    <div class="row bg-white">
                        <div class="col-md-12 mt-4">
                            <strong class="p-2 mt-4">
                                确认订单
                            </strong>
                            <hr>
                        </div>
                        <div class="col-md-12">
                            <div class="row">
                                <div class="col-md-4 col-sm-12">
                                    <a href="javascript:;">
                                        <img src="{$info.image_url ? getUrlPath($info.image_url) :'__STATIC__/img/paybg.png'}" width="100%">
                                    </a>
                                </div>
                                <div class="col-md-4 col-sm-12">
                                    <div class="p-2">
                                        <p class="text-muted font-weight-bold">
                                            {if input('param.type') == 'vip'}
                                            <p class="text-warning">
                                                <strong>
                                                    {$info.title}
                                                </strong>
                                            </p>
                                            {else /}
                                            <a href="{:url('/course',['id'=>$info['id']])}">
                                                {$info.title}
                                            </a>
                                            {/if}
                                        </p>
                                        <p class="text-muted">
                                            <small>
                                                {$info.description}
                                            </small>
                                        </p>
                                        <p>
                                            <strong class="font-weight-bold">¥{$info.price}</strong>
                                        </p>
                                    </div>
                                </div>
                                <div class="col-md-4 col-sm-12">
                                    <div class="p-2" id="payImage"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row bg-white">
                        <div class="col-md-12 mt-4">
                            <strong class="p-2">
                                支付方式
                            </strong>
                            <hr>
                        </div>
                        <div class="col-md-3 col-sm-6 col-12 mt-4">
                            <div class="info-box">
                                <div class="ribbon-wrapper aliPay">
                                    <div class="ribbon bg-info">
                                        支付宝
                                    </div>
                                </div>
                                <span class="info-box-icon">
                                    <!-- <i class="far fa-envelope"></i> -->
                                    <img width="80" height="80" src="__TEMPSTATIC__/img/aliPay.svg" />
                                </span>
                                <input type="hidden" value="1" id="pay">
                                <div class="info-box-content">
                                    <span class="info-box-text">使用支付宝支付</span>
                                    <span class="info-box-number text-danger">¥{$info.price}</span>
                                </div>
                                <!-- /.info-box-content -->
                            </div>
                            <!-- /.info-box -->
                        </div>
                        <div class="col-md-3 col-sm-6 col-12 mt-4">
                            <div class="info-box">
                                <span class="info-box-icon">
                                    <div class="ribbon-wrapper wechatPay">
                                        <div class="ribbon bg-info">
                                            微信支付
                                        </div>
                                    </div>
                                    <!-- <i class="far fa-envelope"></i> -->
                                    <img width="80" height="80" src="__TEMPSTATIC__/img/wechatPay.svg" />
                                </span>
                                <input type="hidden" value="2" id="pay">
                                <div class="info-box-content">
                                    <span class="info-box-text">使用微信支付</span>
                                    <span class="info-box-number text-danger">¥{$info.price}</span>
                                </div>
                                <!-- /.info-box-content -->
                            </div>
                            <!-- /.info-box -->
                        </div>
                        <input type="hidden" name="payType" id="payType" value="0">
                        <div class="col-md-12 mt-4 mb-4">


                            <a href="{:url('/pay/pay',['id'=>input('param.id'),'type'=>$info['type']])}" onclick='coursePay()' class="btn btn-primary btn-sm btn-danger" id="coursePay">立即支付</a>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    {include file='../public/footer' /}
    </div>
    {include file='../public/script' /}
    <script src="__STATIC__/js/jquery.qrcode.min.js"></script>
    <script src="__TEMPSTATIC__/js/order.js"></script>
    <script type="text/javascript">
        $(".info-box").click(function() {

            $('.ribbon-wrapper').hide();
            $(this).find('.ribbon-wrapper').toggle();
            var value = $(this).find('#pay').val();
            $("#payType").val(value);

        });
    </script>
</body>

</html>